//
//  GatheringDetailView.m
//  HAODE
//
//  Created by panquanReabam.com on 16/5/17.
//  Copyright © 2016年 reabam.com. All rights reserved.
//

#import "GatheringDetailView.h"



@interface GatheringDetailView()<UIScrollViewDelegate>
@property(nonatomic ,strong)NSString*endDate;
@end

@implementation GatheringDetailView

{
    UIView*contenView;
    UIImageView *thinLine;
    
    
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        _mainScroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0,0, ScreenWidth,ScreenHeight)];
        _mainScroll.delegate = self;
        _mainScroll.userInteractionEnabled = YES;
        _mainScroll.scrollEnabled = YES;
        _mainScroll.showsVerticalScrollIndicator = FALSE;
        _mainScroll.showsHorizontalScrollIndicator = FALSE;
        [self  addSubview:_mainScroll];

        _statusLabel=[[UILabel alloc]initWithFrame:CGRectMake(20, 0, ScreenWidth, 80)];
        _statusLabel.textAlignment=NSTextAlignmentCenter;
        _statusLabel.font= [UIFont systemFontOfSize:18];
        [_statusLabel setTextColor:backColor];
        [_mainScroll addSubview:_statusLabel];
        
//        if ([[severDataDict.dataDict objectForKey:@"status"]isEqualToString:@"Y"]) {
//            
//            _statusLabel.text=@"交易成功!";
//            UIImageView *gou = [[UIImageView alloc]initWithFrame:CGRectMake(ScreenWidth/2-50,50/2, 30, 30)];
//            gou.image=[UIImage imageNamed:@"gous"];
//            [_mainScroll addSubview:gou];
//            
//        }else{
//            
//            _statusLabel.text=@"交易失败!";
//            UIImageView *gou = [[UIImageView alloc]initWithFrame:CGRectMake(ScreenWidth/2-50,50/2, 30, 30)];
//            gou.image=[UIImage imageNamed:@"jiaoyishibai"];
//            [_mainScroll addSubview:gou];
//        }
        
        
        UILabel*jianyijine=[[UILabel alloc]initWithFrame:CGRectMake(20, 95, 120, 30)];
        jianyijine.text=@"交易金额";
        jianyijine.font= [UIFont systemFontOfSize:15];
        [jianyijine setTextColor:shenhuiColor];
        [_mainScroll addSubview:jianyijine];
        
        
       _payAmountLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 170/2, ScreenWidth, 150)];
        _payAmountLabel.textAlignment=NSTextAlignmentCenter;
        _payAmountLabel.font= [UIFont systemFontOfSize:40];
        [_payAmountLabel setTextColor:backColor];
        [_mainScroll addSubview:_payAmountLabel];
        
        
        UILabel *lines=[[UILabel alloc] initWithFrame:CGRectMake(15, 410, ScreenWidth-30, 0.35)];
        lines.backgroundColor=qianhuiColor;
        [_mainScroll addSubview:lines];
        UILabel *lines1=[[UILabel alloc] initWithFrame:CGRectMake(15, 240-0.35, ScreenWidth-30, 0.35)];
        lines1.backgroundColor=qianhuiColor;
        [_mainScroll addSubview:lines1];
        UIImageView *_xianview1 = [[UIImageView alloc]initWithFrame:CGRectMake(15,80, ScreenWidth-30, 0.5)];
        _xianview1.image=[UIImage imageNamed:@"hengxian"];
        [_mainScroll addSubview:_xianview1];
        
        
        UILabel*payType=[[UILabel alloc]initWithFrame:CGRectMake(20, 250, 120, 30)];
        payType.text=@"交易名称";
        payType.font= [UIFont systemFontOfSize:contenfot];
        [payType setTextColor:shenhuiColor];
        [_mainScroll addSubview:payType];
        
        _payTypeLabel=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth-200, 250, 180, 30)];
        

        
        _payTypeLabel.textAlignment=NSTextAlignmentRight;
        _payTypeLabel.font= [UIFont systemFontOfSize:contenfot];
        [_payTypeLabel setTextColor:backColor];
        [_mainScroll addSubview:_payTypeLabel];
        
        UILabel*Type=[[UILabel alloc]initWithFrame:CGRectMake(20, 280, 120, 30)];
        Type.text=@"交易类型";
        Type.font= [UIFont systemFontOfSize:contenfot];
        [Type setTextColor:shenhuiColor];
        [_mainScroll addSubview:Type];
        
        _typeLabel=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth-200, 280, 180, 30)];
        _typeLabel.textAlignment=NSTextAlignmentRight;
        _typeLabel.font= [UIFont systemFontOfSize:contenfot];
        [_typeLabel setTextColor:backColor];
        [_mainScroll addSubview:_typeLabel];
        
        UILabel*jiaoyidanhao=[[UILabel alloc]initWithFrame:CGRectMake(20, 310, 120, 30)];
        jiaoyidanhao.text=@"交易单号";
        jiaoyidanhao.font= [UIFont systemFontOfSize:contenfot];
        [jiaoyidanhao setTextColor:shenhuiColor];
        [_mainScroll addSubview:jiaoyidanhao];
       _orderNoLabel=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth-260, 310, 240, 30)];
        _orderNoLabel.textAlignment=NSTextAlignmentRight;
        _orderNoLabel.font= [UIFont systemFontOfSize:contenfot];
        [_orderNoLabel setTextColor:backColor];
        [_mainScroll addSubview:_orderNoLabel];
        
        UILabel*SerialNumber=[[UILabel alloc]initWithFrame:CGRectMake(20, 340, 120, 30)];
        SerialNumber.text=@"流水号";
        SerialNumber.font= [UIFont systemFontOfSize:contenfot];
        [SerialNumber setTextColor:shenhuiColor];
        [_mainScroll addSubview:SerialNumber];
        
        _tradeNoLabel=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth-260, 340, 240, 30)];
//        _tradeNoLabel.text=[severDataDict.dataDict objectForKey:@"tradeNo"];
        _tradeNoLabel.textAlignment=NSTextAlignmentRight;
        _tradeNoLabel.font= [UIFont systemFontOfSize:contenfot];
        [_tradeNoLabel setTextColor:backColor];
        [_mainScroll addSubview:_tradeNoLabel];
        
        UILabel*Time=[[UILabel alloc]initWithFrame:CGRectMake(20, 370, 120, 30)];
        Time.text=@"交易时间";
        Time.font= [UIFont systemFontOfSize:contenfot];
        [Time setTextColor:shenhuiColor];
        [_mainScroll addSubview:Time];
        
        _createDateLabel=[[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth-200, 370, 180, 30)];
//        _createDateLabel.text=[severDataDict.dataDict objectForKey:@"createDate"];
        _createDateLabel.textAlignment=NSTextAlignmentRight;
        _createDateLabel.font= [UIFont systemFontOfSize:contenfot];
        [_createDateLabel setTextColor:backColor];
        [_mainScroll addSubview:_createDateLabel];
        
       _remark=[[UILabel alloc]initWithFrame:CGRectMake(20, 420, ScreenWidth*70/750, 45)];
        _remark.text=@"备注";
        _remark.font= [UIFont systemFontOfSize:contenfot];
        [_remark setTextColor:shenhuiColor];
        [_mainScroll addSubview:_remark];
        
//        NSString *s1 =[NSString stringWithFormat:@"%@", [NSString stringWithFormat:@"%@",[severDataDict.dataDict objectForKey:@"remark"]]];
//        UIFont *font1 = [UIFont systemFontOfSize:contenfot];
//        CGSize size1 = CGSizeMake(ScreenWidth-60, 2000);
//        CGSize labelsize1 = [s1 sizeWithFont:font1 constrainedToSize:size1 lineBreakMode:NSLineBreakByCharWrapping];
        
       _remarkLabel=[[UILabel alloc]initWithFrame:CGRectMake(20, _remark.bottom+2, ScreenWidth-40, 130)];
//        _remarkLabel.text=s1;
        _remarkLabel.numberOfLines=0;
        _remarkLabel.font= [UIFont systemFontOfSize:contenfot];
        [_remarkLabel setTextColor:shenhuiColor];
        [_mainScroll addSubview:_remarkLabel];
        
        [_mainScroll setContentSize:CGSizeMake(ScreenWidth, ScreenHeight)];

        
        
        
        
    }
    return self;
}

//-(void)setModel:(ActivityDetailModel *)model{
//    
//    self.endDate=[model.Dict objectForKey:@"endDate"];
//    
//    [_imageView setImageWithURL:[NSURL URLWithString:[model.Dict objectForKey:@"imageUrlFull"]] placeholderImage:[UIImage imageNamed:@""]];
//    _actNameLabel.text=[model.Dict objectForKey:@"actName"];
//    _actTypeLabel.text=[NSString stringWithFormat:@"%@ %@",  @"活动类型",[model.Dict objectForKey:@"actType"]];
//    NSMutableAttributedString *AttributedStr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@ %@",  @"活动类型",[model.Dict objectForKey:@"actType"]]];
//    
//    [AttributedStr addAttribute:NSFontAttributeName
//     
//                          value:[UIFont systemFontOfSize:14]
//     
//                          range:NSMakeRange(0, 4)];
//    
//    [AttributedStr addAttribute:NSForegroundColorAttributeName
//     
//                          value:zhonghuiColor
//     
//                          range:NSMakeRange(0, 4)];
//    
//    
//    _actTypeLabel.attributedText = AttributedStr;
//    
//    
//    _joinCountLabel.text=[ NSString stringWithFormat:@"%@", [model.Dict objectForKey:@"joinCount"]];
//    
//    _actAddress.text=[NSString stringWithFormat:@"%@%@", [model.Dict objectForKey:@"actRegion"], [model.Dict objectForKey:@"actAddress"]];
//    _companyName.text=[[model.Dict objectForKey:@"companyBaseInfo"] objectForKey:@"companyName"];
//    
//    _companyBaseInfo.text=[NSString stringWithFormat:@"主营 %@  ",  [[model.Dict objectForKey:@"companyBaseInfo"] objectForKey:@"businessType"]];
//    _companyBaseInfo.textColor=shenhuiColor;
//    _companyBaseInfo.font=[UIFont systemFontOfSize:13];
//    NSMutableAttributedString *AttributedStr1 = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"主营 %@  ",  [[model.Dict objectForKey:@"companyBaseInfo"] objectForKey:@"businessType"]]];
//    
//    [AttributedStr1 addAttribute:NSFontAttributeName
//     
//                           value:[UIFont systemFontOfSize:13.0]
//     
//                           range:NSMakeRange(0, 3)];
//    
//    [AttributedStr1 addAttribute:NSForegroundColorAttributeName
//     
//                           value:zhonghuiColor
//     
//                           range:NSMakeRange(0, 3)];
//    
//    
//    _companyBaseInfo.attributedText = AttributedStr1;
//    
//    [_companyImgUrlFull setImageWithURL:[NSURL URLWithString:[[model.Dict objectForKey:@"companyBaseInfo"]objectForKey:@"companyImgUrlFull"]] placeholderImage:[UIImage imageNamed:@"touxiang"]];
//    
//    
//    
//    NSString *s12 = [NSString stringWithFormat:@"%@", [model.Dict objectForKey:@"actDetail"]];
//    UIFont *font12 = [UIFont systemFontOfSize:15];
//    CGSize size12 = CGSizeMake(ScreenWidth-30, 2000);
//    CGSize labelsize12 = [s12 sizeWithFont:font12 constrainedToSize:size12 lineBreakMode:NSLineBreakByCharWrapping];
//    
//    _detailLabel=[[UILabel alloc]initWithFrame:CGRectMake(15, thinLine.bottom+25, ScreenWidth-30, labelsize12.height)];
//    _detailLabel.text=[NSString stringWithFormat:@"%@", [model.Dict objectForKey:@"actDetail"]];
//    _detailLabel.textColor=shenhuiColor;
//    _detailLabel.numberOfLines=0;
//    _detailLabel.font=[UIFont systemFontOfSize:15];
//    [contenView addSubview:_detailLabel];
//    
//    contenView.frame=CGRectMake(0, 210, ScreenWidth, _detailLabel.bottom);
//    [_mainScroll setContentSize:CGSizeMake(ScreenWidth, contenView.bottom+64)];
//    
//    
//    
//}
//- (void)TouchUpInside:(UIButton *)button{
//    
//    
//    if (button.tag==301) {
//        
//        [mDelegate ACETelPrompt:@""];
//        
//        
//    }
//    if (button.tag==302) {
//        
//        [mDelegate address:@""];
//        
//    }
//    
//}



@end
